
//tiep js
jQuery('#btmregister').click(function() {
    jQuery(this).attr('disabled', 'disabled');
    var name = jQuery('#hvname').val();
    var sex = jQuery('#select-gender').val();
    var birthday = jQuery('#birthday').val();
    var cmt = jQuery('#cmt').val();
    var email = jQuery('#email').val();
    var phone = jQuery('#phone').val();
    var address = jQuery('#address').val();
    var schools = jQuery('#schools').val();
    var trinhdonn = jQuery('#select-Level').val();
    var trinhdoth = jQuery('#select-Level1').val();
    var vitrimongmuon = jQuery('#vitrimongmuon').val();
    var mucluongmongmuon = jQuery('#select-sale').val();
    var nganhnghequantam = jQuery('#select-conce').val();
    var hinhthuclamviec = jQuery('#select-work').val();
    data = {
        action: 'form_tim_viec',
        hvtname: name,
        gioitinh: sex,
        birthday: birthday,
        cmt: cmt,
        email: email,
        phone: phone,
        address: address,
        schools: schools,
        bachocnn: trinhdonn,
        bachocth: trinhdoth,
        vitrimongmuon: vitrimongmuon,
        mucluongmongmuon: mucluongmongmuon,
        nganhnghequantam: nganhnghequantam,
        methodworking: hinhthuclamviec,
        bct_nonce: bct_vars.bct_nonce
    };
    $.post(bct_vars.ajax_url, data, function(response) {
        //  console.log(response);
        resobj = JSON.parse(response);
        if (resobj.error == 1) {
            jQuery('#showreport').attr('style', 'color:red;');
            jQuery('#showreport').html(resobj.message);
            jQuery('#btmregister').removeAttr('disabled');
            $('#btmregister').attr('href', '#');
            return false;
        } else {
            $('#btmregister').attr('href', '#content-pop');
            return true;
        }
    });

});